home *** CD-ROM | disk | FTP | other *** search
- import java.util.Random;
- import javax.microedition.lcdui.Canvas;
- import javax.microedition.lcdui.Display;
- import javax.microedition.lcdui.Font;
- import javax.microedition.lcdui.Graphics;
- import javax.microedition.lcdui.Image;
-
- public class dsCanvas extends Canvas implements Runnable {
- Display _fld4;
- int _fld2b;
- int _fld3b;
- int _fld4b;
- int _fld5b;
- Font _fld6b;
- int _fld7b;
- Image _fld8b;
- Graphics _fld9b;
- static Random _fld0c = new Random();
- boolean _fld1c;
- boolean _fld2c;
- Thread _fld3c;
- boolean _fld4c = false;
- boolean _fld5c = false;
- int _fld6c;
- int _fld7c;
- int _fld8c;
- String _fld9c = new String();
- byte[] _fld0d;
- String _fld1d = new String();
- byte[] _fld2d;
- int _fld3d;
- int _fld4d;
- int _fld5d;
- int _fld6d;
- int _fld7d;
- int _fld8d;
- int _fld9d;
- int _fld0e;
- int _fld1e;
- int _fld2e;
- int _fld3e;
- int _fld4e;
- int _fld5e;
- int _fld6e;
- int _fld7e = 0;
- int _fld8e;
- int _fld9e;
- int _fld0f;
- int[] _fld1f;
- int _fld2f;
- // $FF: renamed from: GH int
- int field_0;
- // $FF: renamed from: GW int
- int field_1;
- // $FF: renamed from: nx int
- int field_2;
- // $FF: renamed from: ny int
- int field_3;
- int[] _fld3f = new int[16];
- int[] _fld4f = new int[64];
- int[] _fld5f = new int[64];
- Font _fld6f;
- String _fld7f = "Next";
- String _fld8f = "Score";
- String _fld9f = "000000";
- int _fld0g;
- int _fld1g;
- int _fld2g;
- int _fld3g;
- int _fld4g;
- int _fld5g;
- int _fld6g;
- int _fld7g;
- int _fld8g;
- int _fld9g;
- int _fld0h;
- int _fld1h;
- int _fld2h;
- int _fld3h;
- String _fld4h = "000000";
- boolean _fld5h = false;
- int _fld6h = 0;
- int _fld7h = 0;
- int _fld8h = 0;
- int _fld9h = 0;
- int _fld0i;
- int _fld1i;
- int _fld2i;
- int _fld3i;
- int _fld4i;
- int[][] _fld5i = new int[][]{{0, 1, 0, 0}, {1, 1, 1, 1}, {0, 2, 0, 1}, {0, 1, 0, 1}, {0, 1, 0, 1}, {0, 1, 0, 1}, {0, 1, 0, 1}};
- int[][] _fld6i = new int[][]{{3, 3, 3, 2}, {3, 3, 3, 3}, {4, 3, 4, 2}, {3, 3, 3, 3}, {3, 3, 3, 3}, {3, 3, 3, 3}, {3, 3, 3, 3}};
- int[][] _fld7i = new int[][]{{1, 0, 0, 0}, {1, 1, 1, 1}, {2, 0, 1, 0}, {1, 0, 1, 0}, {1, 0, 1, 0}, {1, 0, 1, 0}, {1, 0, 1, 0}};
- int[][] _fld8i = new int[][]{{3, 3, 2, 3}, {3, 3, 3, 3}, {3, 4, 2, 4}, {3, 3, 3, 3}, {3, 3, 3, 3}, {3, 3, 3, 3}, {3, 3, 3, 3}};
- int[] _fld9i = new int[]{16777215, 0, 0, 0, 0, 0, 0, 0};
- int[] _fld0j = new int[]{16777215, 16711680, 45056, 255, 16711935, 65280, 16756736, 45311};
- int[] _fld1j;
- int[] _fld2j = new int[]{0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0};
- int[] _fld3j = new int[]{0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0};
- int[] _fld4j = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0};
- int[] _fld5j = new int[]{0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0};
- int[] _fld6j = new int[]{0, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 5, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 5, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0};
- int[] _fld7j = new int[]{0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 6, 6, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 6, 6, 0, 0, 0, 6, 0, 0, 0, 0, 0};
- int[] _fld8j = new int[]{0, 0, 0, 0, 7, 7, 7, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 0, 0};
-
- public dsCanvas(Display var1) {
- this._fld4 = var1;
- this._fld2b = ((Canvas)this).getWidth();
- this._fld3b = ((Canvas)this).getHeight();
- this._fld8b = Image.createImage(this._fld2b, this._fld3b);
- this._fld9b = this._fld8b.getGraphics();
- this._fld2c = true;
- this._fld0d = new byte[17];
- this._fld2d = new byte[17];
- this._mth6b();
- if (this._fld2b >= 200 && this._fld3b >= 200) {
- this._fld6b = Font.getFont(0, 0, 0);
- } else {
- this._fld6b = Font.getFont(0, 0, 8);
- }
-
- this._fld7b = this._fld6b.getHeight() + 2;
- if (var1.isColor()) {
- this._fld4c = true;
- }
-
- if (var1.numColors() > 4) {
- this._fld5c = true;
- }
-
- this._mth7b();
- this._fld7c = this._fld2b >> 1;
- this._fld8c = this._fld3b >> 1;
- this._fld6c = 0;
- this._mth1c();
- this._mth0c();
- if (var1.numColors() > 2) {
- this._fld4d = -16776961;
- this._fld5d = -1;
- this._fld6d = -256;
- this._fld7d = -1;
- this._fld8d = -16777216;
- this._fld9d = -16776961;
- this._fld0e = -65536;
- this._fld1e = -16776961;
- this._fld2e = -1;
- this._fld3e = -1;
- this._fld4e = -16777216;
- this._fld5e = -16776961;
- this._fld6e = -1;
- } else {
- this._fld4d = -1;
- this._fld5d = -16777216;
- this._fld6d = -16777216;
- this._fld7d = -1;
- this._fld8d = -16777216;
- this._fld9d = -16777216;
- this._fld0e = -16777216;
- this._fld1e = -1;
- this._fld2e = -16777216;
- this._fld3e = -1;
- this._fld4e = -16777216;
- this._fld5e = -16777216;
- this._fld6e = -1;
- }
-
- this._fld1j = new int[6];
- if (var1.numColors() < 4) {
- this._fld1j = this._fld9i;
- } else {
- this._fld1j = this._fld0j;
- }
-
- this._fld3d = 2;
- this._fld0i = 2;
- this.field_0 = 18;
- this.field_1 = 11;
- this._fld1f = new int[this.field_1 * this.field_0];
- }
-
- void _mth0c() {
- if (this._fld0d[4] != 100 || this._fld2d[4] != 68 || this._fld0d[11] != 116 || this._fld2d[16] != 97) {
- this._fld2c = false;
- }
-
- }
-
- void _mth0d() {
- try {
- this._fld4.setCurrent(this);
- if (this._fld3c == null) {
- this._fld3c = new Thread(this);
- }
-
- if (this._fld2c) {
- this._fld1c = false;
- } else {
- this._fld1c = true;
- }
-
- if (!this._fld3c.isAlive()) {
- this._fld3c.start();
- }
- } catch (Exception var1) {
- }
-
- }
-
- void _mth1c() {
- if (this._fld0d[5] != 115 || this._fld2d[11] != 99 || this._fld0d[15] != 111 || this._fld2d[12] != 105) {
- this._fld2c = false;
- }
-
- }
-
- boolean _mth2b(int var1, int var2) {
- if (var2 == this.field_0 - this._fld4i + 1) {
- return true;
- } else {
- for(int var3 = this._fld3i; var3 < this._fld4i; ++var3) {
- for(int var4 = this._fld1i; var4 < this._fld2i; ++var4) {
- if (this._fld1f[(var2 + var3) * this.field_1 + var1 + var4] != 0 && this._fld3f[var3 * 4 + var4] != 0) {
- return true;
- }
- }
- }
-
- return false;
- }
- }
-
- void _mth2c() {
- String var1 = "Game Over!";
- this._fld9b.setColor(this._fld3e);
- this._fld9b.fillRect(0, 0, this._fld2b, this._fld3b);
- Font var2 = Font.getFont(0, 0, 8);
- int var3 = var2.stringWidth(var1);
- this._fld9b.setFont(var2);
- this._fld9b.setColor(this._fld4e);
- this._fld9b.drawString(var1, this._fld7c - (var3 >> 1), this._fld8c + (var2.getHeight() >> 1), 36);
- }
-
- void _mth3b() {
- for(int var1 = 0; var1 < this.field_0; ++var1) {
- boolean var2 = false;
-
- for(int var3 = 0; var3 < this.field_1; ++var3) {
- if (this._fld1f[var1 * this.field_1 + var3] == 0) {
- var2 = true;
- }
- }
-
- if (!var2) {
- for(int var4 = var1 - 1; var4 >= 0; --var4) {
- for(int var5 = 0; var5 < this.field_1; ++var5) {
- this._fld1f[(var4 + 1) * this.field_1 + var5] = this._fld1f[var4 * this.field_1 + var5];
- }
- }
-
- this._fld3h += 10 * this._fld3d;
- if (this._fld3h < 10) {
- this._fld4h = "00000" + this._fld3h;
- } else if (this._fld3h >= 10 && this._fld3h < 100) {
- this._fld4h = "0000" + this._fld3h;
- } else if (this._fld3h >= 100 && this._fld3h < 1000) {
- this._fld4h = "000" + this._fld3h;
- } else if (this._fld3h >= 1000 && this._fld3h < 10000) {
- this._fld4h = "00" + this._fld3h;
- } else if (this._fld3h >= 10000 && this._fld3h < 100000) {
- this._fld4h = "0" + this._fld3h;
- } else {
- this._fld4h = "999999";
- }
- }
- }
-
- }
-
- void _mth3c() {
- for(int var1 = 0; var1 < 3; ++var1) {
- this.field_3 = this._fld0f + 1;
- if (this._mth2b(this.field_2, this.field_3)) {
- this._mth9c(this._fld9e, this._fld0f);
- this._mth7c();
- return;
- }
-
- this._fld0f = this.field_3;
- this._fld9e = this.field_2;
- }
-
- }
-
- void _mth4b() {
- if (this._fld9h++ >= this._fld0i) {
- this._fld9h = 0;
- this.field_3 = this._fld0f + 1;
- if (this._mth2b(this.field_2, this.field_3)) {
- this._mth9c(this._fld9e, this._fld0f);
- this._mth7c();
- } else {
- this._fld0f = this.field_3;
- this._fld9e = this.field_2;
- }
- }
-
- }
-
- void _mth4c() {
- this._fld9b.setColor(this._fld3e);
- this._fld9b.fillRect(0, 0, this._fld2b, this._fld3b);
- this._fld9b.setFont(this._fld6b);
- int var1 = this._fld6b.stringWidth(this._fld9c);
- this._fld9b.setColor(this._fld1e);
- this._fld9b.fillRect(0, 0, this._fld2b, this._fld7b - 2);
- this._fld9b.setColor(this._fld2e);
- this._fld9b.drawString(this._fld9c, this._fld7c - (var1 >> 1), 0, 20);
-
- for(int var2 = 0; var2 < 16; ++var2) {
- this._fld3f[var2] = this._fld5f[16 * this._fld6h + var2];
- }
-
- this._fld1i = this._fld5i[this._fld7h][this._fld6h];
- this._fld2i = this._fld6i[this._fld7h][this._fld6h];
- this._fld3i = this._fld7i[this._fld7h][this._fld6h];
- this._fld4i = this._fld8i[this._fld7h][this._fld6h];
- this._mth3b();
- if (this._fld5h) {
- this._mth3c();
- } else {
- this._mth4b();
- }
-
- for(int var3 = 0; var3 < this.field_1; ++var3) {
- if (this._fld1f[var3 + this.field_1 * 2] != 0) {
- this._fld2f = 3;
- }
- }
-
- this._fld9b.setColor(this._fld4e);
- this._fld9b.drawRect(this._fld4b, this._fld5b, this.field_1 * this._fld8e, this.field_0 * this._fld8e);
-
- for(int var4 = 0; var4 < 4; ++var4) {
- for(int var5 = 0; var5 < 4; ++var5) {
- int var6 = this._fld3f[var4 * 4 + var5];
- if (var6 != 0) {
- this._fld9b.setColor(this._fld1j[var6]);
- this._fld9b.fillRect(this._fld4b + (this._fld9e + var5) * this._fld8e + 1, this._fld5b + (this._fld0f + var4) * this._fld8e + 1, this._fld2h, this._fld2h);
- }
- }
- }
-
- for(int var10 = 0; var10 < this.field_0; ++var10) {
- for(int var11 = 0; var11 < this.field_1; ++var11) {
- int var7 = this._fld1f[var10 * this.field_1 + var11];
- if (var7 != 0) {
- this._fld9b.setColor(this._fld1j[var7]);
- this._fld9b.fillRect(this._fld4b + var11 * this._fld8e + 1, this._fld5b + var10 * this._fld8e + 1, this._fld2h, this._fld2h);
- }
- }
- }
-
- this._fld9b.setColor(this._fld4e);
- this._fld9b.drawRoundRect(this._fld8g, this._fld9g, this._fld0h, this._fld1h, 3, 3);
- int var12 = this._fld8e;
- if (this._fld8h != 0 && this._fld8h != 3) {
- if (this._fld8h == 1 || this._fld8h == 2) {
- var12 = this._fld8e << 1;
- }
- } else {
- var12 = this._fld8e + (this._fld8e >> 1);
- }
-
- for(int var13 = 0; var13 < 4; ++var13) {
- for(int var8 = 0; var8 < 4; ++var8) {
- int var9 = this._fld4f[var13 * 4 + var8];
- if (var9 != 0) {
- this._fld9b.setColor(this._fld1j[var9]);
- this._fld9b.fillRect(this._fld6g - var12 + var8 * this._fld8e + 1, this._fld7g + var13 * this._fld8e + 1, this._fld2h, this._fld2h);
- }
- }
- }
-
- this._fld9b.setColor(this._fld4e);
- this._fld9b.setFont(this._fld6f);
- this._fld9b.drawString(this._fld7f, this._fld0g, this._fld1g, 20);
- this._fld9b.drawString(this._fld8f, this._fld2g, this._fld3g, 20);
- this._fld9b.setColor(this._fld5e);
- this._fld9b.drawString(this._fld4h, this._fld4g, this._fld5g, 20);
- }
-
- void _mth5b() {
- this._fld1c = true;
- }
-
- void _mth5c() {
- String var1 = "DS Blocks";
- this._fld9b.setColor(this._fld4d);
- this._fld9b.fillRect(0, 0, this._fld2b, this._fld3b);
- Font var2 = Font.getFont(0, 1, 16);
- int var3 = var2.stringWidth(var1);
- this._fld9b.setFont(var2);
- this._fld9b.setColor(this._fld5d);
- int var4 = (this._fld8c >> 1) + var2.getHeight();
- this._fld9b.drawString(var1, this._fld7c - (var3 >> 1), var4, 36);
- var2 = Font.getFont(0, 0, 8);
- this._fld9b.setFont(var2);
- var3 = var2.stringWidth(this._fld9c);
- this._fld9b.setColor(this._fld6d);
- this._fld9b.drawString(this._fld9c, this._fld7c - (var3 >> 1), var4 + (var2.getHeight() >> 1) + 4, 36);
- String var5 = "Press start to play";
- int var6 = var2.stringWidth(var5);
- if (this._fld7e++ > 5) {
- this._fld9b.setColor(this._fld5d);
- this._fld9b.drawString(var5, this._fld7c - (var6 >> 1), this._fld8c + (var2.getHeight() << 1), 36);
- }
-
- this._fld7e %= 10;
- }
-
- void _mth6b() {
- this._fld2d[7] = this._fld2d[12] = 105;
- this._fld0d[0] = this._fld0d[1] = this._fld0d[2] = 119;
- this._fld2d[13] = this._fld2d[5] = this._fld2d[16] = 97;
- this._fld0d[3] = this._fld0d[13] = 46;
- this._fld2d[8] = this._fld0d[15] = 111;
- this._fld0d[5] = this._fld0d[12] = 115;
- this._fld2d[7] = this._fld2d[12] = 105;
- this._fld0d[6] = this._fld0d[9] = 101;
- this._fld2d[1] = this._fld2d[11] = this._fld2d[14] = this._fld2d[15] = this._fld0d[10] = this._fld0d[14] = 99;
- this._fld0d[7] = this._fld0d[8] = 102;
- this._fld2d[3] = this._fld2d[9] = 32;
- }
-
- void _mth6c() {
- this._fld9b.setColor(this._fld7d);
- this._fld9b.fillRect(0, 0, this._fld2b, this._fld3b);
- Font var1 = Font.getFont(0, 1, 8);
- int var2 = var1.stringWidth("Choose Speed");
- this._fld9b.setFont(var1);
- int var3 = var1.stringWidth("> ");
- int var4 = var1.getHeight();
- this._fld9b.setColor(this._fld8d);
- this._fld9b.drawString("Choose Speed", this._fld7c - (var2 >> 1), var4, 36);
- int var5 = this._fld7c - (var3 >> 1);
- this._fld9b.setColor(this._fld9d);
- this._fld9b.drawString("1", var5, 2 * var4, 36);
- this._fld9b.drawString("2", var5, 3 * var4, 36);
- this._fld9b.drawString("3", var5, 4 * var4, 36);
- switch (this._fld3d) {
- case 1:
- this._fld0i = 4;
- break;
- case 2:
- this._fld0i = 2;
- break;
- case 3:
- this._fld0i = 1;
- }
-
- this._fld9b.setColor(this._fld0e);
- this._fld9b.drawString(">", this._fld7c - var3, (this._fld3d + 1) * var4, 36);
- this._mth8b();
- }
-
- void _mth7b() {
- this._fld2d[0] = 40;
- this._fld0d[16] = 109;
- this._fld2d[2] = 41;
- this._fld2d[4] = 68;
- this._fld0d[4] = 100;
- this._fld2d[6] = 114;
- this._fld0d[11] = 116;
- this._fld2d[10] = 83;
- this._fld9c = new String(this._fld0d);
- this._fld1d = new String(this._fld2d);
- }
-
- void _mth7c() {
- this.field_2 = this._fld9e = (this.field_1 >> 1) - 1;
- this.field_3 = this._fld0f = 0;
- this._fld5h = false;
- this._fld6h = 0;
- this._fld7h = this._fld8h;
- this._fld5f = this._fld4f;
-
- for(int var1 = 0; var1 < 16; ++var1) {
- this._fld3f[var1] = this._fld5f[var1];
- }
-
- this._fld8h = Math.abs(_fld0c.nextInt() % 7);
- switch (this._fld8h) {
- case 0:
- this._fld4f = this._fld2j;
- break;
- case 1:
- this._fld4f = this._fld3j;
- break;
- case 2:
- this._fld4f = this._fld4j;
- break;
- case 3:
- this._fld4f = this._fld5j;
- break;
- case 4:
- this._fld4f = this._fld6j;
- break;
- case 5:
- this._fld4f = this._fld7j;
- break;
- case 6:
- this._fld4f = this._fld8j;
- }
-
- }
-
- void _mth8b() {
- this._fld8e = (this._fld3b - this._fld7b) / this.field_0;
- int var1 = Math.min(this._fld2b, this._fld3b - this._fld7b) >> 1;
- this._fld4b = this._fld7c - var1;
- this._fld5b = this._fld8c + (this._fld7b >> 1) - var1;
- if (this._fld8e > 2) {
- this._fld2h = this._fld8e - 1;
- } else {
- this._fld2h = this._fld8e;
- }
-
- this._fld8g = this._fld4b + (this.field_1 + 2) * this._fld8e;
- this._fld9g = this._fld5b;
- this._fld6f = Font.getFont(0, 1, 8);
- int var2 = this._fld6f.stringWidth(this._fld7f);
- int var3 = this._fld6f.stringWidth(this._fld8f);
- int var4 = this._fld6f.stringWidth(this._fld9f);
- this._fld0g = this._fld8g + 2 + (var4 >> 1) - (var2 >> 1);
- this._fld1g = this._fld9g;
- this._fld6g = this._fld8g + 2 + (var4 >> 1);
- this._fld7g = this._fld1g + this._fld6f.getHeight();
- this._fld2g = this._fld8g + 2 + (var4 >> 1) - (var3 >> 1);
- this._fld3g = this._fld7g + 4 * this._fld8e;
- this._fld4g = this._fld8g + 2;
- this._fld5g = this._fld3g + this._fld6f.getHeight();
- this._fld0h = 2 + var4;
- this._fld1h = 2 + this._fld6f.getHeight() * 3 + 4 * this._fld8e;
-
- for(int var5 = 0; var5 < this.field_1 * this.field_0; ++var5) {
- this._fld1f[var5] = 0;
- }
-
- this._fld8h = Math.abs(_fld0c.nextInt() % 7);
- switch (this._fld8h) {
- case 0:
- this._fld4f = this._fld2j;
- break;
- case 1:
- this._fld4f = this._fld3j;
- break;
- case 2:
- this._fld4f = this._fld4j;
- break;
- case 3:
- this._fld4f = this._fld5j;
- break;
- case 4:
- this._fld4f = this._fld6j;
- break;
- case 5:
- this._fld4f = this._fld7j;
- break;
- case 6:
- this._fld4f = this._fld8j;
- }
-
- this._mth7c();
- this._fld3h = 0;
- this._fld4h = "000000";
- }
-
- void _mth8c() {
- this._fld1c = true;
- }
-
- void _mth9b() {
- if (this._fld2f == 0) {
- this._mth5c();
- } else if (this._fld2f == 1) {
- this._mth6c();
- } else if (this._fld2f == 2) {
- this._mth4c();
- } else if (this._fld2f == 3) {
- this._mth2c();
- }
-
- }
-
- void _mth9c(int var1, int var2) {
- for(int var3 = this._fld3i; var3 < this._fld4i; ++var3) {
- for(int var4 = this._fld1i; var4 < this._fld2i; ++var4) {
- if (this._fld1f[(var2 + var3) * this.field_1 + var1 + var4] == 0) {
- this._fld1f[(var2 + var3) * this.field_1 + var1 + var4] = this._fld3f[var3 * 4 + var4];
- }
- }
- }
-
- }
-
- public void keyPressed(int var1) {
- switch (((Canvas)this).getGameAction(var1)) {
- case 1:
- if (this._fld2f == 1) {
- if (this._fld3d > 1) {
- --this._fld3d;
- }
- } else if (this._fld2f == 2 && !this._fld5h) {
- int var3 = (this._fld6h + 1) % 4;
- if (this.field_2 + this._fld5i[this._fld7h][var3] >= 0 && this.field_2 + this._fld6i[this._fld7h][var3] <= this.field_1) {
- this._fld6h = var3;
- }
- }
- break;
- case 2:
- if (this._fld2f == 2 && !this._fld5h && this.field_2 + this._fld5i[this._fld7h][this._fld6h] > 0) {
- --this.field_2;
- }
- case 3:
- case 4:
- case 7:
- default:
- break;
- case 5:
- if (this._fld2f == 2 && !this._fld5h && this.field_2 + this._fld2i <= this.field_1 - 1) {
- ++this.field_2;
- }
- break;
- case 6:
- if (this._fld2f == 1) {
- if (this._fld3d < 3) {
- ++this._fld3d;
- }
- } else if (this._fld2f == 2 && !this._fld5h) {
- int var2 = (this._fld6h + 4 - 1) % 4;
- if (this.field_2 + this._fld5i[this._fld7h][var2] >= 0 && this.field_2 + this._fld6i[this._fld7h][var2] <= this.field_1) {
- this._fld6h = var2;
- }
- }
- break;
- case 8:
- if (this._fld2f == 2 && !this._fld5h) {
- this._fld5h = true;
- }
- }
-
- }
-
- protected void paint(Graphics var1) {
- if (this._fld8b != null) {
- var1.drawImage(this._fld8b, 0, 0, 20);
- }
-
- }
-
- public void run() {
- if (!this._fld1c) {
- do {
- Runtime var1 = Runtime.getRuntime();
- if (var1.freeMemory() < 5000L) {
- var1.gc();
- }
-
- this._mth9b();
- ((Canvas)this).repaint();
- ((Canvas)this).serviceRepaints();
- byte var2 = 20;
-
- try {
- Thread.sleep((long)var2);
- } catch (InterruptedException var3) {
- }
- } while(!this._fld1c);
-
- }
- }
- }
-